#include<iostream>
#define dd 1000
using namespace std;

class big{
int len=0;
int arr[dd];
public:
    big(int num=0){
        for(int i=0;i<dd;i++){arr[i]=0;}
        while(num!=0){
            arr[len]=num%10;num/=10;
        }
    }
    int&operator[](int place){return arr[place];}
    void flatten(){
        for(int i=0;i<dd-1;i++){
            arr[i+1]+=arr[i]/10;arr[i]%=10;
        }
        for(int i=0;i<dd;i++){
            if(arr[i]!=0)len=i+1;
        }
    }

    void show(){
        for(int i=len-1;i>=0;i--)cout<<arr[i];
    }
    big operator+(big num){
        big res;
        for(int i=0;i<dd;i++){
            res[i]=arr[i]+num[i];
        }
        res.flatten();
        return res;
    }
};


big arr[5050];
int main(){
    arr[1]=big(1);
    arr[2]=big(2);
    int n;
    cin>>n;
    if(n==1){
        cout<<1<<endl;
        return 0;
    }
    if(n==2){
        cout<<2<<endl;
        return 0;
    }
    for(int i=3;i<=n;i++){
        arr[i]=arr[i-1]+arr[i-2];
    }
    arr[n].show();
    return 0;
}